﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CamadaDados;

namespace CasaisEmEdificacao.Gerenciador.video
{
    public partial class formVideo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSalvar_Click(object sender, EventArgs e)
        {
            var objVideo = new tb_video();

            objVideo.DS_NOME = txtNome.Text;
            objVideo.DS_LINK = txtLink.Text;
            objVideo.DS_DESCRICAO = txtDescricao.Text;
            objVideo.CO_SITUACAO = Convert.ToInt32(ddlStatus.SelectedValue);
            objVideo.DT_CADASTRO = DateTime.Now;
            var metVideo = new CamadaDados.video();
            metVideo.SalvarVideo(objVideo);

            Response.Redirect("~/Gerenciador/video/index.aspx?msn=1");
        }

        protected void btnCancelar_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Gerenciador/video/index.aspx");
        }
    }

}